package com.goodwill.hdr.Strategy.impl;

import com.goodwill.hdr.Strategy.HbaseFilterStrategy;
import com.goodwill.hdr.Strategy.SingleColumnValueFilterBuilder;
import com.goodwill.hdr.vo.PropertyFilter;
import org.apache.hadoop.hbase.CompareOperator;
import org.apache.hadoop.hbase.filter.FilterList;
import org.springframework.stereotype.Component;

@Component
public class HbaseGe implements HbaseFilterStrategy {
    @Override
    public void execute(PropertyFilter propertyFilter, FilterList list) {
        list.addFilter(
                SingleColumnValueFilterBuilder.buildWithBinaryComparator
                        (propertyFilter, CompareOperator.GREATER_OR_EQUAL)
        );
    }
}
